home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / os2 / plnk081.zip / pilot-link.0.8.1 / Makefile.os2.orig < prev    next >
Makefile  |  1997-08-09  |  14KB  |  420 lines

  1.  
  2. prefix = @prefix@
  3. exec_prefix = @exec_prefix@
  4. bindir = @bindir@
  5. libdir = @libdir@
  6. pixdir = ${libdir}/pix
  7. includedir = @includedir@
  8. mandir = @mandir@/man1
  9. srcdir = ./
  10. VPATH = ./
  11.  
  12. top_builddir = .
  13.  
  14. PURELINK =
  15. PURIFY =
  16.  
  17. # Libraries needed to link with Tcl & (optionally) Tk
  18. TCLTK_LIBS = 
  19. # Include directives needed to compile with Tcl & Tk, and
  20. # -DTCL if Tcl is available, and
  21. # -DTK if Tk is available.
  22. TCLTK_FLAGS = 
  23.  
  24. # Libraries needed to link with GNU readline
  25. RLLIBS = 
  26. # Include directives needed to compile with GNU readline, and
  27. # -DREADLINE_2_0 if GNU readline 2.0 is available, or 
  28. # -DREADLINE_2_1 if GNU readline 2.1 (or later) is available.
  29. RLDEFS = 
  30.  
  31. PERL5 = @PERL5@
  32.  
  33. CC = gcc
  34. CXX = gcc
  35. CDEFS = -DLIBDIR=\"$(libdir)\" 
  36. # -DDEBUG
  37. CFLAGS = -I./include -I$(srcdir)/include -g -Zcrtdll -O2 -fno-strength-reduce -D__ST_MT_ERRNO__ -Wall $(RLDEFS) $(CDEFS) $(TCLTK_FLAGS)
  38. CXXFLAGS = -I./include -I$(srcdir)/include -g -O2 -fno-strength-reduce -Wall $(RLDEFS) $(CDEFS) $(TCLTK_FLAGS)
  39. LDFLAGS = 
  40. LIBS = -lsocket -los2
  41. # -lefence
  42. CXXLIBS = -lstdcpp
  43.  
  44. libcclib = libcc/libpicc.a
  45. cclib = libpicc.a
  46.  
  47. INSTALL = $(LIBTOOL) @INSTALL@
  48. INSTALL_PROGRAM = @INSTALL_PROGRAM@
  49. INSTALL_DATA = @INSTALL_DATA@
  50. YACC = bison -y
  51. RANLIB = ar -s
  52. RM = rm -f
  53. STRIP = strip
  54. SHELL = /bin/sh
  55. CPLIB = cp
  56. EXT = .EXE
  57. SUBMAKE_COMM = $(MAKE) -C $(top_builddir)/libsock -f Makefile.os2
  58. SUBMAKE_COMM_CC = $(MAKE) -C $(top_builddir)/libcc -f Makefile.os2
  59.  
  60. LIBTOOL =
  61. LIBTOOLLINK =
  62.  
  63. CCLINK = $(LIBTOOLLINK)  $(PURELINK) $(PURIFY) $(CC) $(LDFLAGS) $(CFLAGS)
  64. CXXLINK = $(LIBTOOLLINK) $(PURELINK) $(PURIFY) $(CXX) $(LDFLAGS) $(CXXFLAGS)
  65.  
  66. .SUFFIXES: .out .o .cc .c .e .r .f .y .l .s .p
  67.  
  68. .c.o:
  69.     $(CC) $(CFLAGS) -c $<
  70.  
  71. .cc.o:
  72.     $(CXX) $(CXXFLAGS) -c $<
  73.  
  74.  
  75. WITHTCL = $(TCLEXECS)
  76. WITHCXX = $(CXXEXECS)
  77. WITHPERL5 = $(PERLEXECS)
  78.  
  79. CEXECS = pilot-xfer$(EXT) pilot-file$(EXT) pilot-dedupe$(EXT) pilot-schlep$(EXT)\
  80.         install-memo$(EXT) install-user$(EXT) install-datebook$(EXT)\
  81.         install-todos$(EXT) pilot-addresses$(EXT) pilot-clip$(EXT)\
  82.         read-ical$(EXT) pilot-mail$(EXT) read-expenses$(EXT)\
  83.         sync-memodir$(EXT) sync-ical$(EXT) $(CCEXECS) \
  84.         reminders$(EXT) memos$(EXT) addresses$(EXT) read-todos$(EXT)\
  85.         debugsh$(EXT) dlpsh$(EXT) \
  86.         getrom$(EXT) pi-getrom$(EXT) pi-port$(EXT) \
  87.         test-connector$(EXT) test-acceptor$(EXT) \
  88.         pi-csd$(EXT) pi-nredir$(EXT) 
  89.  
  90. CXXEXECS = ccexample$(EXT) iambicexample$(EXT)
  91.  
  92. TCLEXECS = pilot-debug$(EXT)
  93.  
  94. PERLEXECS = pilot-undelete ietf2datebook
  95.  
  96. EXECS = $(CEXECS) $(WITHOUTTCL) $(WITHCXX) $(WITHOUTPERL5)
  97.  
  98. PILIB = libsock/libpisockdll.a
  99. PICCLIB = libcc/libpicc.a
  100.  
  101. all: $(EXECS)
  102.  
  103. $(PILIB): FORCE
  104.     $(SUBMAKE_COMM) libpisockdll.a
  105.  
  106. libcc/libpicc.a: FORCE
  107.     $(SUBMAKE_COMM_CC) libpicc.a
  108.  
  109. installdirs:
  110.     $(SHELL) ${srcdir}/scripts/mkinstalldirs $(bindir) $(includedir) $(libdir) $(pixdir) $(mandir)
  111.  
  112. install: $(EXECS) installdirs $(PILIB) $(PICCLIB)
  113.     $(INSTALL_DATA) $(PILIB) $(libdir)/libpisockdll.a
  114.     if test -n "$(PICCLIB)"; then \
  115.         $(INSTALL_DATA) $(PICCLIB) $(libdir)/libpicc.a; \
  116.     fi
  117.     for p in $(EXECS); do \
  118.         $(INSTALL_PROGRAM) $$p $(bindir)/$$p; \
  119.     done
  120.     for h in include/*.h $(srcdir)/include/*.h; do \
  121.         $(INSTALL_DATA) $$h $(includedir)/`basename $$h`; \
  122.     done
  123.     for m in man/*.1; do \
  124.         $(INSTALL_DATA) $$m $(mandir)/`basename $$m`; \
  125.     done
  126.     for p in $(srcdir)/pix/*.gif $(srcdir)/pix/*.xbm; do \
  127.         $(INSTALL_DATA) $$p $(pixdir)/`basename $$p`; \
  128.     done
  129.     $(LIBTOOL) -n --finish $(libdir)
  130.  
  131. uninstall:
  132.     -for p in $(EXECS) $(PERLEXECS) $(CXXEXECS) $(TCLEXECS); do \
  133.         $(RM) $(bindir)/$$p; \
  134.     done
  135.     -rmdir $(bindir)
  136.     -for h in include/*; do \
  137.         $(RM) $(includedir)/`basename $$h`; \
  138.     done
  139.     -rmdir $(includedir)
  140.     -$(LIBTOOL) $(RM) $(libdir)/libpisockdll.a
  141.     -$(LIBTOOL) $(RM) $(libdir)/libpicc.a
  142.     -rmdir $(libdir)
  143.  
  144. install-memo$(EXT): $(PILIB) install-memo.o
  145.     $(CCLINK) install-memo.o $(PILIB) -o $@ $(LIBS)
  146.  
  147. install-datebook$(EXT): $(PILIB) install-datebook.o parsedate.o
  148.     $(CCLINK) install-datebook.o parsedate.o $(PILIB) -o $@ $(LIBS)
  149.  
  150. install-todos$(EXT): $(PILIB) install-todos.o
  151.     $(CCLINK) install-todos.o $(PILIB) -o $@ $(LIBS)
  152.  
  153. pilot-addresses$(EXT): $(PILIB) pilot-addresses.o
  154.     $(CCLINK) pilot-addresses.o $(PILIB) -o $@ $(LIBS)
  155.  
  156. pilot-dedupe$(EXT): $(PILIB) pilot-dedupe.o
  157.     $(CCLINK) pilot-dedupe.o $(PILIB) -o $@ $(LIBS)
  158.  
  159. install-user$(EXT): $(PILIB) install-user.o
  160.     $(CCLINK) install-user.o $(PILIB) -o $@ $(LIBS)
  161.  
  162. pilot-xfer$(EXT): $(PILIB) pilot-xfer.o
  163.     $(CCLINK) pilot-xfer.o $(PILIB) -o $@ $(LIBS)
  164.  
  165. pilot-schlep$(EXT): $(PILIB) pilot-schlep.o
  166.     $(CCLINK) pilot-schlep.o $(PILIB) -o $@ $(LIBS)
  167.  
  168. pilot-mail$(EXT): $(PILIB) pilot-mail.o parsedate.o
  169.     $(CCLINK) pilot-mail.o parsedate.o $(PILIB) -o $@ $(LIBS)
  170.  
  171. pi-port$(EXT): $(PILIB) pi-port.o
  172.     $(CCLINK) pi-port.o $(PILIB) -o $@ $(LIBS)
  173.  
  174. pi-getrom$(EXT): $(PILIB) pi-getrom.o
  175.     $(CCLINK) pi-getrom.o $(PILIB) -o $@ $(LIBS)
  176.  
  177. pilot-file$(EXT): $(PILIB) pilot-file.o
  178.     $(CCLINK) pilot-file.o $(PILIB) -o $@ $(LIBS)
  179.  
  180. pilot-clip$(EXT): $(PILIB) pilot-clip.o
  181.     $(CCLINK) pilot-clip.o $(PILIB) -o $@ $(LIBS)
  182.  
  183. pilot-debug.o: pilot-debug.c Makefile
  184.     $(CC) $(CFLAGS) -c pilot-debug.c
  185.  
  186. pd-tty.o: pd-tty.c Makefile
  187.     $(CC) $(CFLAGS) -c pd-tty.c
  188.  
  189. pilot-debug$(EXT): $(PILIB) pilot-debug.o pd-tty.o
  190.     $(CCLINK) pilot-debug.o pd-tty.o $(PILIB) -o $@ $(TCLTK_LIBS) $(RLLIBS) $(LIBS)
  191.  
  192. reminders$(EXT): $(PILIB) reminders.o
  193.     $(CCLINK) reminders.o $(PILIB) -o $@ $(LIBS)
  194.  
  195. memos$(EXT): $(PILIB) memos.o
  196.     $(CCLINK) memos.o $(PILIB) -o $@ $(LIBS)
  197.  
  198. read-todos$(EXT): $(PILIB) read-todos.o
  199.     $(CCLINK) read-todos.o $(PILIB) -o $@ $(LIBS)
  200.  
  201. read-expenses$(EXT): $(PILIB) read-expenses.o
  202.     $(CCLINK) read-expenses.o $(PILIB) -o $@ $(LIBS)
  203.  
  204. read-ical$(EXT): $(PILIB) read-ical.o
  205.     $(CCLINK) read-ical.o $(PILIB) -o $@ $(LIBS)
  206.  
  207. sync-memodir$(EXT): $(PILIB) sync-memodir.o
  208.     $(CCLINK) sync-memodir.o $(PILIB) -o $@ $(LIBS)
  209.  
  210. sync-ical$(EXT): $(PILIB) sync-ical.o
  211.     $(CCLINK) sync-ical.o $(PILIB) -o $@ $(LIBS)
  212.  
  213. addresses$(EXT): $(PILIB) addresses.o
  214.     $(CCLINK) addresses.o $(PILIB) -o $@ $(LIBS)
  215.  
  216. test-connector$(EXT): $(PILIB) test-connector.o
  217.     $(CCLINK) test-connector.o $(PILIB) -o $@ $(LIBS)
  218.  
  219. test-acceptor$(EXT): $(PILIB) test-acceptor.o
  220.     $(CCLINK) test-acceptor.o $(PILIB) -o $@ $(LIBS)
  221.  
  222. dlpsh$(EXT): $(PILIB) dlpsh.o
  223.     $(CCLINK) dlpsh.o $(PILIB) -o $@ $(LIBS)
  224.  
  225. debugsh$(EXT): $(PILIB) debugsh.o
  226.     $(CCLINK) debugsh.o $(PILIB) -o $@ $(LIBS)
  227.  
  228. pi-csd$(EXT): $(PILIB) pi-csd.o
  229.     $(CCLINK) pi-csd.o $(PILIB) -o $@ $(LIBS)
  230.  
  231. pi-nredir$(EXT): $(PILIB) pi-nredir.o
  232.     $(CCLINK) pi-nredir.o $(PILIB) -o $@ $(LIBS)
  233.  
  234. ccexample$(EXT): $(PILIB) $(PICCLIB) ccexample.o
  235.     $(CXXLINK) ccexample.o $(PILIB) $(PICCLIB) -o $@ $(CXXLIBS) $(LIBS)
  236.  
  237. validate$(EXT): $(PILIB) $(PICCLIB) validate.o
  238.     $(CXXLINK) validate.o $(PILIB) $(PICCLIB) -o $@ $(CXXLIBS) $(LIBS)
  239.  
  240. iambicexample$(EXT): $(PILIB) $(PICCLIB) iambicexample.o
  241.     $(CXXLINK) iambicexample.o $(PILIB) $(PICCLIB) -o $@ $(CXXLIBS) $(LIBS)
  242.  
  243. getrom$(EXT): $(PILIB) getrom.o
  244.     $(CCLINK) getrom.o $(PILIB) -o $@ $(LIBS)
  245.  
  246. parsedate.c: parsedate.y
  247.     @echo Expect six shift/reduce conflicts
  248.     $(YACC) parsedate.y
  249.     mv y.tab.c parsedate.c
  250.  
  251. pilot-undelete: pilot-undelete.PL
  252.     $(PERL5) pilot-undelete.PL > pilot-undelete
  253.     chmod +x pilot-undelete
  254.  
  255. ietf2datebook: ietf2datebook.PL
  256.     $(PERL5) ietf2datebook.PL > ietf2datebook
  257.     chmod +x ietf2datebook
  258.  
  259. FORCE:
  260.  
  261. Python:    FORCE
  262.     cd Python; make
  263.  
  264. Perl5 Perl: FORCE
  265.     cd Perl5; $(PERL5) Makefile.PL && make
  266.  
  267. Tcl: FORCE
  268.     cd Tcl; make
  269.     
  270. Java: FORCE
  271.     cd Java; make
  272.     
  273. check test tests: FORCE
  274.     cd tests; make tests
  275.  
  276. strip: $(EXECS)
  277.     $(STRIP) $(EXECS)
  278.  
  279. depend:
  280.     @-p4 edit Makefile.in */Makefile.in 2>&1 >> /dev/null
  281.     @-chmod +w */Makefile.in 2>&1 >> /dev/null
  282.     $(SUBMAKE_COMM) depend
  283.     $(SUBMAKE_COMM_CC) depend
  284.     perl -i~ -ne 'print if 1../^#Depend/' Makefile.in ; gcc -w -MM -Iinclude *.c >> Makefile.in
  285.     @-p4 revert `p4 diff -sr Makefile.in */Makefile.in` 2>&1 >> /dev/null 
  286.  
  287. os2:
  288.     @-p4 edit Makefile.os2 */Makefile.os2 2>&1 >> /dev/null
  289.     @-chmod +w Makefile.os2 */Makefile.os2 2>&1 >> /dev/null
  290.     perl scripts/os2dist.pl
  291.     @-p4 revert `p4 diff -sr Makefile.os2 */Makefile.os2` 2>&1 >> /dev/null 
  292.  
  293. distclean: clean depend os2
  294.     $(RM) Makefile libsock/Makefil include/pi-config.h
  295.     $(RM) libcc/Makefile
  296.     $(RM) config.log config.status config.cache libtool
  297.     $(RM) PiDebug.log
  298.     -cd Perl5 ; make realclean ; rm Makefile.PL
  299.     -cd Python ; make distclean
  300.     -cd Tcl ; make clean
  301.     -cd Java ; make distclean
  302.     -cd tests ; make distclean
  303.     $(RM) *~ *.orig */*~ */*.orig
  304.     $(RM) Tcl/Makefile Perl5/Makefile.PL Perl5/Makefile Python/Makefile
  305.  
  306. clean:
  307.     $(RM) *.o *.a *.lo *.a core a.out tarball test_s test_c install-prc$(EXT) pilot-debug$(EXT)
  308.     $(RM) -r .libs
  309.     $(RM) $(CEXECS) $(TCLEXECS) $(CXXEXECS) $(PERLEXECS) validate 
  310.     $(RM) pilot.rom* pilot2.rom*
  311.     $(SUBMAKE_COMM) clean
  312.     $(SUBMAKE_COMM_CC) clean
  313.  
  314. tarball: distclean
  315.     gcc -o tarball scripts/tarball.c -Iinclude
  316.     ./tarball
  317.  
  318. #Depend information starts here. Do not edit the text beyond this point!
  319. addresses.o: addresses.c include/pi-source.h include/pi-config.h \
  320.  include/pi-socket.h include/pi-args.h include/pi-macros.h \
  321.  include/pi-address.h include/pi-appinfo.h include/pi-dlp.h
  322. debugsh.o: debugsh.c include/pi-source.h include/pi-config.h \
  323.  include/pi-socket.h include/pi-args.h include/pi-macros.h \
  324.  include/pi-dlp.h include/pi-syspkt.h
  325. dlpsh.o: dlpsh.c include/pi-source.h include/pi-config.h \
  326.  include/pi-socket.h include/pi-args.h include/pi-macros.h \
  327.  include/pi-padp.h include/pi-dlp.h include/pi-serial.h
  328. getrom.o: getrom.c include/pi-source.h include/pi-config.h \
  329.  include/pi-socket.h include/pi-args.h include/pi-macros.h \
  330.  include/pi-serial.h
  331. install-datebook.o: install-datebook.c include/pi-source.h \
  332.  include/pi-config.h include/pi-socket.h include/pi-args.h \
  333.  include/pi-macros.h include/pi-dlp.h include/pi-datebook.h \
  334.  include/pi-appinfo.h
  335. install-memo.o: install-memo.c include/pi-source.h include/pi-config.h \
  336.  include/pi-socket.h include/pi-args.h include/pi-macros.h \
  337.  include/pi-dlp.h include/pi-memo.h include/pi-appinfo.h
  338. install-todos.o: install-todos.c include/pi-source.h \
  339.  include/pi-config.h include/pi-socket.h include/pi-args.h \
  340.  include/pi-macros.h include/pi-dlp.h include/pi-todo.h \
  341.  include/pi-appinfo.h
  342. install-user.o: install-user.c include/pi-source.h include/pi-config.h \
  343.  include/pi-socket.h include/pi-args.h include/pi-macros.h \
  344.  include/pi-dlp.h
  345. memos.o: memos.c include/pi-source.h include/pi-config.h \
  346.  include/pi-socket.h include/pi-args.h include/pi-macros.h \
  347.  include/pi-memo.h include/pi-appinfo.h include/pi-dlp.h
  348. parsedate.o: parsedate.c
  349. pd-tty.o: pd-tty.c include/pi-source.h include/pi-config.h \
  350.  include/pi-socket.h include/pi-args.h include/pi-macros.h \
  351.  include/pi-dlp.h include/pi-syspkt.h
  352. pi-csd.o: pi-csd.c include/pi-source.h include/pi-config.h \
  353.  include/pi-socket.h include/pi-args.h include/pi-macros.h \
  354.  include/pi-dlp.h include/pi-serial.h include/pi-slp.h
  355. pi-getrom.o: pi-getrom.c include/pi-source.h include/pi-config.h \
  356.  include/pi-socket.h include/pi-args.h include/pi-macros.h \
  357.  include/pi-syspkt.h include/pi-dlp.h
  358. pi-nredir.o: pi-nredir.c include/pi-source.h include/pi-config.h \
  359.  include/pi-socket.h include/pi-args.h include/pi-macros.h \
  360.  include/pi-dlp.h
  361. pi-port.o: pi-port.c include/pi-source.h include/pi-config.h \
  362.  include/pi-socket.h include/pi-args.h include/pi-macros.h \
  363.  include/pi-dlp.h include/pi-serial.h include/pi-slp.h
  364. pilot-addresses.o: pilot-addresses.c include/pi-source.h \
  365.  include/pi-config.h include/pi-socket.h include/pi-args.h \
  366.  include/pi-macros.h include/pi-dlp.h include/pi-address.h \
  367.  include/pi-appinfo.h
  368. pilot-clip.o: pilot-clip.c include/pi-source.h include/pi-config.h \
  369.  include/pi-socket.h include/pi-args.h include/pi-macros.h \
  370.  include/pi-syspkt.h include/pi-dlp.h
  371. pilot-debug.o: pilot-debug.c include/pi-source.h include/pi-config.h \
  372.  include/pi-socket.h include/pi-args.h include/pi-macros.h \
  373.  include/pi-dlp.h include/pi-syspkt.h
  374. pilot-dedupe.o: pilot-dedupe.c include/pi-source.h include/pi-config.h \
  375.  include/pi-socket.h include/pi-args.h include/pi-macros.h \
  376.  include/pi-dlp.h
  377. pilot-file.o: pilot-file.c include/pi-source.h include/pi-config.h \
  378.  include/pi-socket.h include/pi-args.h include/pi-macros.h \
  379.  include/pi-dlp.h include/pi-file.h
  380. pilot-mail.o: pilot-mail.c include/pi-source.h include/pi-config.h \
  381.  include/pi-socket.h include/pi-args.h include/pi-macros.h \
  382.  include/pi-mail.h include/pi-appinfo.h include/pi-dlp.h
  383. pilot-prc.o: pilot-prc.c include/pi-source.h include/pi-config.h \
  384.  include/pi-socket.h include/pi-args.h include/pi-macros.h \
  385.  include/pi-dlp.h include/pi-file.h
  386. pilot-schlep.o: pilot-schlep.c include/pi-source.h include/pi-config.h \
  387.  include/pi-socket.h include/pi-args.h include/pi-macros.h \
  388.  include/pi-file.h include/pi-dlp.h
  389. pilot-xfer.o: pilot-xfer.c include/pi-source.h include/pi-config.h \
  390.  include/pi-socket.h include/pi-args.h include/pi-macros.h \
  391.  include/pi-file.h include/pi-dlp.h
  392. read-expenses.o: read-expenses.c include/pi-source.h \
  393.  include/pi-config.h include/pi-socket.h include/pi-args.h \
  394.  include/pi-macros.h include/pi-expense.h include/pi-appinfo.h \
  395.  include/pi-dlp.h
  396. read-ical.o: read-ical.c include/pi-source.h include/pi-config.h \
  397.  include/pi-socket.h include/pi-args.h include/pi-macros.h \
  398.  include/pi-todo.h include/pi-appinfo.h include/pi-datebook.h \
  399.  include/pi-dlp.h
  400. read-todos.o: read-todos.c include/pi-source.h include/pi-config.h \
  401.  include/pi-socket.h include/pi-args.h include/pi-macros.h \
  402.  include/pi-todo.h include/pi-appinfo.h include/pi-dlp.h
  403. reminders.o: reminders.c include/pi-source.h include/pi-config.h \
  404.  include/pi-socket.h include/pi-args.h include/pi-macros.h \
  405.  include/pi-datebook.h include/pi-appinfo.h include/pi-dlp.h
  406. sync-ical.o: sync-ical.c include/pi-source.h include/pi-config.h \
  407.  include/pi-socket.h include/pi-args.h include/pi-macros.h \
  408.  include/pi-sync.h include/pi-datebook.h include/pi-appinfo.h \
  409.  include/pi-todo.h include/pi-dlp.h
  410. sync-memodir.o: sync-memodir.c include/pi-source.h include/pi-config.h \
  411.  include/pi-socket.h include/pi-args.h include/pi-macros.h \
  412.  include/pi-datebook.h include/pi-appinfo.h include/pi-todo.h \
  413.  include/pi-dlp.h include/pi-sync.h
  414. test-acceptor.o: test-acceptor.c include/pi-source.h \
  415.  include/pi-config.h include/pi-socket.h include/pi-args.h \
  416.  include/pi-macros.h include/pi-dlp.h
  417. test-connector.o: test-connector.c include/pi-source.h \
  418.  include/pi-config.h include/pi-socket.h include/pi-args.h \
  419.  include/pi-macros.h include/pi-dlp.h
  420.